#! /bin/sh -vx
# $Id$
# Copyright 2016-2017 Karl Berry <tex-live@tug.org>
# Copyright 2015 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

TEXMFCNF=$srcdir/../kpathsea

export TEXMFCNF

# DOCSRC=$srcdir/$GREGORIO_TREE/doc

BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_gregorio=$BinDir/gregorio$ExeExt

failed=

echo "*** gregorio --version" \
	&& $_gregorio --version \
	&& echo && echo "gregorio-version tests OK" && echo \
	|| failed="$failed gregorio-version"

echo "*** gregorio --help" \
	&& $_gregorio --help \
	&& echo && echo "gregorio-help tests OK" && echo \
	|| failed="$failed gregorio-help"

# echo "*** gregorio -o factus.gtex factus.gabc" \
# 	&& $_gregorio -o factus.gtex $DOCSRC/factus.gabc \
# 	&& echo && echo "gregorio-factus tests OK" && echo \
# 	|| failed="$failed gregorio-factus"

# echo "*** gregorio -o veni.gtex veni.gabc" \
# 	&& $_gregorio -o veni.gtex $DOCSRC/veni.gabc \
# 	&& echo && echo "gregorio-veni tests OK" && echo \
# 	|| failed="$failed gregorio-veni"

test -z "$failed" && exit 0
echo
echo "failed tests:$failed"
exit 1
